<template>
    <div>
        <h1>App</h1>
        <p>count:{{count}}</p>
        <button @click="add">累加</button>
        <button @click="kill">累减</button>
        <button @click="addN({n:6})">累加N</button>
        <button @click="addWait">等两秒后累加</button>
    </div>
</template>

<script>
import {mapState,mapMutations} from "vuex"
export default {
    name:"App",
    mounted() {
        console.log(this,"app");
    },
    computed:{
        ...mapState(["count","num"])
    },
    methods: {
        ...mapMutations(["add","kill","addN","addWait"])
    },
}
</script>

<style>

</style>